/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.sql.Date;

/**
 *
 * @author JArik
 */
public class Operation extends Item{
    private int dogId;
    private boolean deleted=false;
    public Operation()
    {
        
    }
    public Operation(int nId, int nDogId, String nName)
    {
        super.setId(nId);
        super.setName(nName);
        dogId = nDogId;
        super.setDisDate(null);
    }
    public Operation(int nId, double price ,String nName, String nDescr, Date nMade, Doctor nExec)
    {
        super.setId(nId);
        super.setName(nName);
        super.setDoctor(nExec);
        super.setDescr(nDescr);
        super.setDisDate(nMade);
    }
    public Operation(int nId, double pr, String nName, String nDescr, Visit nVisit)
    {
        super.setId(nId);
        super.setName(nName);
        super.setDoctor(nVisit.getExec());
        super.setDescr(nDescr);
        super.setDisDate(nVisit.getDisDate());
        super.setSellPrice(pr);
        super.setDescr(nDescr);
    }

        public void setDeleted(boolean del)
    {
        deleted = del;
    }
    public boolean isDeleted()
    {
        return deleted;
    }
    public String toString()
    {
        //if(date != null)
       //     return "Сделано: " + name;
       // else
            return getName();
    }

}
